<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:1px;">
  <t:datagrid name="cbsServiceCapacityList" checkbox="true" fitColumns="false" title="服务商产能" actionUrl="cbsServiceCapacityController.do?datagrid" idField="id" fit="true" queryMode="group">
   <t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="服务商"  field="serviceProvider"  dictionary="t_s_depart,id,shortname" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="年份"  field="year"    queryMode="single" query="true" width="120"></t:dgCol>
   <t:dgCol title="最低产能"  field="minCount"    queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="计划产能"  field="planCount"    queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="可调节最大产能"  field="maxCount"    queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="创建人名称"  field="createName"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="创建人登录名称"  field="createBy"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="创建日期"  field="createDate" formatter="yyyy-MM-dd" hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="更新人名称"  field="updateName"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="更新人登录名称"  field="updateBy"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="更新日期"  field="updateDate" formatter="yyyy-MM-dd" hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="操作" field="opt" width="100"></t:dgCol>
<%--    <t:dgDelOpt title="删除" url="cbsServiceCapacityController.do?doDel&id={id}" /> --%>
   <t:dgFunOpt title="修改" funname="updateFun(serviceProvider,year)"></t:dgFunOpt>
   <t:dgToolBar title="录入" icon="icon-add" url="cbsServiceCapacityController.do?goAdd" height="500" funname="add"></t:dgToolBar>
<%--    <t:dgToolBar title="编辑" icon="icon-edit" url="cbsServiceCapacityController.do?goUpdate" funname="update"></t:dgToolBar> --%>
<%--    <t:dgToolBar title="批量删除"  icon="icon-remove" url="cbsServiceCapacityController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar> --%>
<%--    <t:dgToolBar title="查看" icon="icon-search" url="cbsServiceCapacityController.do?goUpdate" funname="detail"></t:dgToolBar> --%>
<%--    <t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar> --%>
<%--    <t:dgToolBar title="导出" icon="icon-putout" funname="ExportXls"></t:dgToolBar> --%>
<%--    <t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar> --%>
  </t:datagrid>
  </div>
 </div>
 
 <div id="tempSearchColums" style="display: none">
    <div name="searchColums">
        <span style="display:-moz-inline-box;display:inline-block;">
            <span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 80px;text-align:right;">
               	服务商：
            </span>
            <select name="serviceProvider">
				<option value="">--请选择--</option>
				<c:forEach items="${thirdDepartList }" var="depart">
					<option value="${depart.id }">${depart.shortname }</option>
				</c:forEach>
			</select>
        </span>
    </div>
</div>
 <script type="text/javascript">
 $(document).ready(function(){
 		//给时间控件加上样式
 			$("#cbsServiceCapacityListtb").find("input[name='createDate']").attr("class","Wdate").attr("style","height:20px;width:90px;").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
 			$("#cbsServiceCapacityListtb").find("input[name='updateDate']").attr("class","Wdate").attr("style","height:20px;width:90px;").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
 			$("#cbsServiceCapacityListtb").find("input[name='year']").attr("class","Wdate").attr("style","height:20px;width:90px;").click(function(){WdatePicker({dateFmt:'yyyy'});});
 });
 
 $(function(){
	 var datagrid = $("#cbsServiceCapacityListtb");
     datagrid.find("div[name='searchColums']").prepend($("#tempSearchColums div[name='searchColums']").html());
 })
 
 function updateFun(serviceProvider,year){
	 gridname='cbsServiceCapacityList';
	 createwindow('修改服务商产能','cbsServiceCapacityController.do?goUpdate&serviceProvider='+serviceProvider+"&year="+year,700,500);
 }
 
//导入
function ImportXls() {
	openuploadwin('Excel导入', 'cbsServiceCapacityController.do?upload', "cbsServiceCapacityList");
}

//导出
function ExportXls() {
	JeecgExcelExport("cbsServiceCapacityController.do?exportXls","cbsServiceCapacityList");
}

//模板下载
function ExportXlsByT() {
	JeecgExcelExport("cbsServiceCapacityController.do?exportXlsByT","cbsServiceCapacityList");
}
 </script>